/*
 * Image.h
 *
 *  Created on: 12/09/2012
 *      Author: leandro
 */

#ifndef IMAGE_H_
#define IMAGE_H_

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include <string>

using namespace std;

Uint32 get_pixel(SDL_Surface *surface, int x, int y);
void set_pixel(SDL_Surface *surface, int x, int y, Uint32 pixel);

SDL_Surface* cargar_imagen( std::string filename );
void colorKey(SDL_Surface* surface, int color_r = 0, int color_b = 0xFF, int color_g = 0xFF);
SDL_Surface* ajustar_imagen(SDL_Surface *Surface, int Width, int Height, int color_r = 0, int color_b = 0xFF, int color_c = 0xFF);
int insertar_imagen( int x, int y, SDL_Surface* fuente, SDL_Surface* destino, SDL_Rect* clip=NULL);

SDL_Surface* espejarX(SDL_Surface* imagen);
SDL_Surface* espejarY(SDL_Surface* imagen);

SDL_Surface* rotar_imagen(SDL_Surface* imagen, int angulo);

#endif /* IMAGE_H_ */
